﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;


namespace DHQGHN.DAL.Models.DanhMuc
{
    [DataContract]
    public class AdministrativeUnit
    {
        #region Constructors
        public AdministrativeUnit()
        {
            this.ADM_UNIT_ID = Common.NullValues.Default_String;
            this.P_ID = Common.NullValues.Default_String;
            this.CODE = Common.NullValues.Default_String;
            this.P_CODE = Common.NullValues.Default_String;
            this.ADM_TYPE = Common.NullValues.Default_String;
            this.LEVELS = Common.NullValues.Default_Int;
            this.PROVINCE_CODE = Common.NullValues.Default_String;
            this.DISTRICT_CODE = Common.NullValues.Default_String;
            this.COMMUNE_CODE = Common.NullValues.Default_String;
            this.ADM_NAME = Common.NullValues.Default_String;
            this.PROVINCE_NAME = Common.NullValues.Default_String;
            this.DISTRICT_NAME = Common.NullValues.Default_String;
            this.COMMUNE_NAME = Common.NullValues.Default_String;
            this.DESCRIPTIONS = Common.NullValues.Default_String;
            this.DELETED = Common.NullValues.Default_Int;
            this.START_DATE = Common.NullValues.Default_Int;
            this.END_DATE = Common.NullValues.Default_Int;
            this.LAST_UPDATED = Common.NullValues.Default_DateTime;
        }
        #endregion

        #region Properties
        [DataMember]
        public string ADM_UNIT_ID { get; set; } //ADMINIS_UNIT_ID bigint
        [DataMember]
        public string P_ID { get; set; } //P_ID bigint
        [DataMember]
        public string CODE { get; set; } //CODE varchar(10)
        [DataMember]
        public string P_CODE { get; set; } //P_CODE varchar(5)
        [DataMember]
        public string ADM_TYPE { get; set; } //ADMINIS_TYPE varchar(2)
        [DataMember]
        public int LEVELS { get; set; } //LEVELS smallint
        [DataMember]
        public string PROVINCE_CODE { get; set; } //PROVINCE_CODE varchar(2)
        [DataMember]
        public string DISTRICT_CODE { get; set; } //DISTRICT_CODE varchar(3)
        [DataMember]
        public string COMMUNE_CODE { get; set; } //COMMUNE_CODE varchar(5)
        [DataMember]
        public string ADM_NAME { get; set; } //ADMINIS_NAME nvarchar(100)
        [DataMember]
        public string PROVINCE_NAME { get; set; } //PROVINCE_NAME nvarchar(50)
        [DataMember]
        public string DISTRICT_NAME { get; set; } //DISTRICT_NAME nvarchar(50)
        [DataMember]
        public string COMMUNE_NAME { get; set; } //COMMUNE_NAME nvarchar(50)
        [DataMember]
        public string DESCRIPTIONS { get; set; } //DESCRIPTIONS nvarchar(150)
        [DataMember]
        public int DELETED { get; set; } //DELETED smallint
        [DataMember]
        public int START_DATE { get; set; } //START_DATE int
        [DataMember]
        public int END_DATE { get; set; } //END_DATE int
        [DataMember]
        public DateTime LAST_UPDATED { get; set; } //LAST_UPDATED datetime
        #endregion
     
        #region Field list from Model
        public const string Field_ADMINIS_UNIT_ID = "ADM_UNIT_ID";
        public const string Field_P_ID = "P_ID";
        public const string Field_CODE = "CODE";
        public const string Field_P_CODE = "P_CODE";
        public const string Field_ADMINIS_TYPE = "ADM_TYPE";
        public const string Field_LEVELS = "LEVELS";
        public const string Field_PROVINCE_CODE = "PROVINCE_CODE";
        public const string Field_DISTRICT_CODE = "DISTRICT_CODE";
        public const string Field_COMMUNE_CODE = "COMMUNE_CODE";
        public const string Field_ADMINIS_NAME = "ADM_NAME";
        public const string Field_PROVINCE_NAME = "PROVINCE_NAME";
        public const string Field_DISTRICT_NAME = "DISTRICT_NAME";
        public const string Field_COMMUNE_NAME = "COMMUNE_NAME";
        public const string Field_DESCRIPTIONS = "DESCRIPTIONS";
        public const string Field_DELETED = "DELETED";
        public const string Field_START_DATE = "START_DATE";
        public const string Field_END_DATE = "END_DATE";
        public const string Field_LAST_UPDATED = "LAST_UPDATED";
        #endregion
    }

    public class ModelAreaListThongKe
    {
        public string PROVINCE_CODE { get; set; }
        public string DISTRICT_CODE { get; set; }
        public string COMMUNE_CODE { get; set; }
        public string STARTDATE { get; set; }
        public string ENDDATE { get; set; }
        public string dk { get; set; }
    }

    [DataContract]
    public class ThongKeDS
    {
        #region Constructors
        public ThongKeDS()
        {
            this.ADM_UNIT_ID = Common.NullValues.Default_String;
            this.P_ID = Common.NullValues.Default_String;
            this.CODE = Common.NullValues.Default_String;
            this.P_CODE = Common.NullValues.Default_String;
            this.ADM_TYPE = Common.NullValues.Default_String;
            this.LEVELS = Common.NullValues.Default_Int;
            this.PROVINCE_CODE = Common.NullValues.Default_String;
            this.DISTRICT_CODE = Common.NullValues.Default_String;
            this.COMMUNE_CODE = Common.NullValues.Default_String;
            this.ADM_NAME = Common.NullValues.Default_String;
            this.PROVINCE_NAME = Common.NullValues.Default_String;
            this.DISTRICT_NAME = Common.NullValues.Default_String;
            this.COMMUNE_NAME = Common.NullValues.Default_String;
            this.DESCRIPTIONS = Common.NullValues.Default_String;
            this.DELETED = Common.NullValues.Default_Int;
            this.START_DATE = Common.NullValues.Default_Int;
            this.END_DATE = Common.NullValues.Default_Int;
            this.LAST_UPDATED = Common.NullValues.Default_DateTime;
            this.TongDanSo = Common.NullValues.Default_String;
            this.DaHoanThanh = Common.NullValues.Default_String;
            this.ChuaHoanThanh = Common.NullValues.Default_String;
        }
        #endregion

        #region Properties
        [DataMember]
        public string ADM_UNIT_ID { get; set; } //ADMINIS_UNIT_ID bigint
        [DataMember]
        public string P_ID { get; set; } //P_ID bigint
        [DataMember]
        public string CODE { get; set; } //CODE varchar(10)
        [DataMember]
        public string P_CODE { get; set; } //P_CODE varchar(5)
        [DataMember]
        public string ADM_TYPE { get; set; } //ADMINIS_TYPE varchar(2)
        [DataMember]
        public int LEVELS { get; set; } //LEVELS smallint
        [DataMember]
        public string PROVINCE_CODE { get; set; } //PROVINCE_CODE varchar(2)
        [DataMember]
        public string DISTRICT_CODE { get; set; } //DISTRICT_CODE varchar(3)
        [DataMember]
        public string COMMUNE_CODE { get; set; } //COMMUNE_CODE varchar(5)
        [DataMember]
        public string ADM_NAME { get; set; } //ADMINIS_NAME nvarchar(100)
        [DataMember]
        public string PROVINCE_NAME { get; set; } //PROVINCE_NAME nvarchar(50)
        [DataMember]
        public string DISTRICT_NAME { get; set; } //DISTRICT_NAME nvarchar(50)
        [DataMember]
        public string COMMUNE_NAME { get; set; } //COMMUNE_NAME nvarchar(50)
        [DataMember]
        public string DESCRIPTIONS { get; set; } //DESCRIPTIONS nvarchar(150)
        [DataMember]
        public int DELETED { get; set; } //DELETED smallint
        [DataMember]
        public int START_DATE { get; set; } //START_DATE int
        [DataMember]
        public int END_DATE { get; set; } //END_DATE int
        [DataMember]
        public DateTime LAST_UPDATED { get; set; } //LAST_UPDATED datetime
        [DataMember]
        public string TongDanSo { get; set; } //Tong dan so
        [DataMember]
        public string DaHoanThanh { get; set; }
        [DataMember]
        public string ChuaHoanThanh { get; set; }

        #endregion

        #region Field list from Model
        public const string Field_ADMINIS_UNIT_ID = "ADM_UNIT_ID";
        public const string Field_P_ID = "P_ID";
        public const string Field_CODE = "CODE";
        public const string Field_P_CODE = "P_CODE";
        public const string Field_ADMINIS_TYPE = "ADM_TYPE";
        public const string Field_LEVELS = "LEVELS";
        public const string Field_PROVINCE_CODE = "PROVINCE_CODE";
        public const string Field_DISTRICT_CODE = "DISTRICT_CODE";
        public const string Field_COMMUNE_CODE = "COMMUNE_CODE";
        public const string Field_ADMINIS_NAME = "ADM_NAME";
        public const string Field_PROVINCE_NAME = "PROVINCE_NAME";
        public const string Field_DISTRICT_NAME = "DISTRICT_NAME";
        public const string Field_COMMUNE_NAME = "COMMUNE_NAME";
        public const string Field_DESCRIPTIONS = "DESCRIPTIONS";
        public const string Field_DELETED = "DELETED";
        public const string Field_START_DATE = "START_DATE";
        public const string Field_END_DATE = "END_DATE";
        public const string Field_LAST_UPDATED = "LAST_UPDATED";
        public const string Field_TongDanSo = "TongDanSo";
        public const string Field_DaHoanThanh = "DaHoanThanh";
        public const string Field_ChuaHoanThanh = "ChuaHoanThanh";
        #endregion
    }

}
